let pg = 0

function cgpg() {
    let m = document.getElementById('m')
    if (pg === 0) {
        pgtoSet()
    }
    else {
        pgtoM()
    }
}

function pgtoSet() {
    let m = document.getElementById('m')
    let s = document.getElementById('s')
    m.style.display = 'none'
    s.style.display = 'block'
    pg = 1
}

function pgtoM() {
    let m = document.getElementById('m')
    let s = document.getElementById('s')
    m.style.display = 'block'
    s.style.display = 'none'
    pg = 0
}